// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 分享文件 创建文件分享 POST /api/share/shareFile */
export async function shareFileUsingPost(body: API.FileShareDTO, options?: { [key: string]: any }) {
  return request<API.Result>('/api/share/shareFile', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 获取分享列表 分页获取用户的分享文件列表 POST /api/share/loadShareList */
export async function loadShareListUsingPost(
  params: {
    /** 页码 */
    pageNo: string
    /** 每页数量 */
    pageSize: string
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/share/loadShareList', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 取消分享 支持批量取消，多个分享ID用逗号分隔 POST /api/share/cancelShare */
export async function cancelShareUsingPost(
  params: {
    /** 分享ID列表，多个ID用逗号分隔，例如: id1,id2,id3 */
    shareIds: string
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/share/cancelShare', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
